/***************************************************************
*  Copyright (c) 2007 by GroupMe! Team (www.groupme.net)
*  All rights reserved.
*
*  This file is part of the GroupMe! Project. Source code of 
*  this project is closed and redistribution of this code is
*  prohibited. 
*  
*  Contact: http://www.groupme.net
*
*  This copyright notice MUST APPEAR in all copies of the file!
***************************************************************/
package net.groupme.mail;

import java.io.IOException;
import java.util.MissingResourceException;
import java.util.Properties;
import java.util.ResourceBundle;

/**
 * created on Jul 27, 2007
 * 
 * Autogenerated Property-Bundle-Reader...
 * 
 * @author last edited by: $Author: fabian $
 * 
 * @version $Revision: 1.3 $ $Date: 2007-11-08 18:40:20 $
 */
public class MailSenderPropertyManager {
	private static final String BUNDLE_NAME = "net.groupme.mail.mail"; //$NON-NLS-1$

	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
			.getBundle(BUNDLE_NAME);
	static Properties properties = new Properties();
	static {
		try {
			properties.load(MailSenderUtility.class.getResourceAsStream("/net/groupme/mail/mail.properties"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	private MailSenderPropertyManager() {
	}

	public static String getString(String key) {
		try {
			return RESOURCE_BUNDLE.getString(key);
		} catch (MissingResourceException e) {
			return '!' + key + '!';
		}
	}
	
	public static String[] getStringArray(String key) {
		try {
			Object res = RESOURCE_BUNDLE.getObject(key);
			return RESOURCE_BUNDLE.getString(key).split(",");
		} catch (MissingResourceException e) {
			return new String[0];
		}
	}
}
